/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.pv.hibernatepokus.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;

/**
 *
 * @author Premek
 */
@Entity
public class Product implements Serializable {
    
    @Id 
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_product")
    @SequenceGenerator(name="seq_product", sequenceName="seq_product")
    private Long id;
    
    private String name;
    
    private BigDecimal price;

    private Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Product{" + "id=" + id + ", name=" + name + ", price=" + price + '}';
    }
    
}
